package com.his.his_system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 医院药品关联表
 * @TableName dzm_his_hospital_medicines_relation
 */
@TableName(value ="dzm_his_hospital_medicines_relation")
public class DzmHisHospitalMedicinesRelation implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long hmrId;

    /**
     * 药品id
     */
    private Integer medicinesId;

    /**
     * 医院id
     */
    private Integer hospitalId;

    /**
     * 创建时间
     */
    private Object createTime;

    /**
     * 更新时间
     */
    private Object updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    public Long getHmrId() {
        return hmrId;
    }

    /**
     * id
     */
    public void setHmrId(Long hmrId) {
        this.hmrId = hmrId;
    }

    /**
     * 药品id
     */
    public Integer getMedicinesId() {
        return medicinesId;
    }

    /**
     * 药品id
     */
    public void setMedicinesId(Integer medicinesId) {
        this.medicinesId = medicinesId;
    }

    /**
     * 医院id
     */
    public Integer getHospitalId() {
        return hospitalId;
    }

    /**
     * 医院id
     */
    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    /**
     * 创建时间
     */
    public Object getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Object createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Object getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Object updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisHospitalMedicinesRelation other = (DzmHisHospitalMedicinesRelation) that;
        return (this.getHmrId() == null ? other.getHmrId() == null : this.getHmrId().equals(other.getHmrId()))
            && (this.getMedicinesId() == null ? other.getMedicinesId() == null : this.getMedicinesId().equals(other.getMedicinesId()))
            && (this.getHospitalId() == null ? other.getHospitalId() == null : this.getHospitalId().equals(other.getHospitalId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getHmrId() == null) ? 0 : getHmrId().hashCode());
        result = prime * result + ((getMedicinesId() == null) ? 0 : getMedicinesId().hashCode());
        result = prime * result + ((getHospitalId() == null) ? 0 : getHospitalId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", hmrId=").append(hmrId);
        sb.append(", medicinesId=").append(medicinesId);
        sb.append(", hospitalId=").append(hospitalId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}